import db from '../utils/dbconf'
import { SQL_ERROR } from '../server.config.js'
const TABLE_NAME = 'GRADE'

export default{
  addAll: async ({body:{grades}},res) => {
    try {
      await db.table(TABLE_NAME).addAll(grades)
      return res.send({
        code:200
      })
    } catch (error) {
      return res.send(SQL_ERROR)
    }
  },
}